/** 
 * @Description: 文件描述
 * @Author: 程前
 * @Date: 2024-12-31 11:32:28
 * @LastEditors: 程前
 * @LastEditTime: 2024-12-31 14:08:02
 */
import { Viewer, Cesium3DTileset } from "cesium";
import { vi } from "element-plus/es/locale";

/**
 * 加载3dTileset
 */
export const load3dTileset = async (viewer: Viewer, url: string, options?: Cesium3DTileset.ConstructorOptions) => {
    const tileset = await Cesium3DTileset.fromUrl(url, options);
    viewer.scene.primitives.add(tileset);
    viewer.zoomTo(tileset)
    return tileset;
};
